home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / msker312.zip / MSKERMIT.INI < prev    next >
Text File  |  1992-10-11  |  10KB  |  267 lines

  1. ; FILE MSKERMIT.INI
  2. ;
  3. ; Standard initialization file for MS-DOS Kermit 3.11 or 3.12.  Kermit
  4. ; executes the commands in this file automatically when it starts.  Kermit
  5. ; looks for MSKERMIT.INI first in the current disk and directory, and if it is
  6. ; not found there, then in the disks and directories listed in your DOS PATH
  7. ; variable (if any).  You can override Kermit's initialization file search by
  8. ; specifying a different filename on the command line, preceded by the -F
  9. ; switch, for example "kermit -f monday.ini" or "kermit -f nul".
  10. ;
  11. ; Author: Christine M. Gianone, February 1990 (for MS-DOS Kermit version 3.0)
  12. ;   Revised for version 3.11 September 1991.
  13. ;   Revised for version 3.12 October 1992.
  14.  
  15. ; CUSTOMIZATIONS
  16. ;
  17. ; It is recommended that you not modify this file.  Instead, you should adapt
  18. ; the sample MSCUSTOM.INI file to make your customizations: key settings,
  19. ; macro definitions, SET commands to override the ones in this file, and so
  20. ; on.  The MSCUSTOM.INI file should go in the same directory as this file.
  21. ; This file will execute MSCUSTOM.INI if it can be found.
  22.  
  23. ; COMPATIBILITY
  24. ;
  25. ; This initialization file works for versions 3.11 and 3.12 of MS-DOS Kermit.
  26. ; The IF INPATH command is new to version 3.12; it tests whether a given file
  27. ; can be found in your DOS PATH or your current directory.  The IF INPATH
  28. ; command is not used if your MS-DOS Kermit version is earlier than 3.12.
  29.  
  30. ; PATCHES
  31. ;
  32. ; The MSKERMIT.PCH file contains "patches" (corrections) to MS-DOS Kermit.
  33. ; If the MSKERMIT.PCH file can be found, and it agrees with your Kermit
  34. ; version, the patches are applied at this time.  The MSKERMIT.PCH file
  35. ; is included on your MS-DOS Kermit distribution diskette.  Updated patch
  36. ; files can be obtained from Columbia University.
  37. ;
  38. if > \v(version) 311 if not inpath MSKERMIT.PCH goto begin
  39. echo Installing patches...
  40. echo
  41. patch
  42.  
  43. :BEGIN
  44.  
  45. echo MS-DOS Kermit 3.11 / 3.12 initialization file...
  46.  
  47. ; Macros for automatic host-initiated file transfers.
  48. ; See pages 180-181 of "Using MS-DOS Kermit", second edition.
  49. ;
  50. define terminals server, connect    ; For sending files automatically
  51. define terminalr receive, connect    ; For receiving files automatically
  52.  
  53. COMMENT - Variable definitions...
  54.  
  55. ; Reserved variables.  If you define new macros, don't use these names:
  56. ;
  57. ;  _editor   - DOS command that runs my preferred editor, for EDIT macro.
  58. ;  _editfile - Last EDIT command filename, defined by EDIT macro.
  59. ;  _dialfile - Pathname of dialing directory file, for DIAL macro.
  60. ;  _dialnum  - Last DIAL command phone number, defined by DIAL macro.
  61. ;  _modem    - Modem type for DIAL command.  Used to run the appropriate
  62. ;              dialing script, e.g. HAYES.SCR.
  63. ;
  64. ; You can override the default _editor, _dialfile, and _modem definitions
  65. ; by setting environment variables in your AUTOEXEC.BAT file, for example:
  66. ;
  67. ;   SET EDITOR=EDIT
  68. ;   SET MODEM=ROLM
  69. ;   SET DIALFILE=C:\PHONES\DIALING.DIR
  70.  
  71. ; Editor...
  72. ;
  73. define _editor edlin            ; EDLIN is the default editor.
  74. if not eq "\$(EDITOR)" "" -
  75.   define _editor \$(EDITOR)
  76.  
  77. ; Dialing directory file...
  78. ;
  79. define _dialfile C:\KERMIT\DIALUPS.TXT    ; Default dialing directory file.
  80. if not eq "\$(DIALFILE)" "" -
  81.   define _dialfile \$(DIALFILE)
  82. if > \v(version) 311 if not inpath \m(_dialfile) -
  83.   echo Dialing directory \m(_dialfile) not found.
  84.  
  85. ; The type of modem you have.  You also need a corresponding <name>.SCR
  86. ; file to dial the modem.  For example, if the value of _modem is HAYES,
  87. ; you must have a HAYES.SCR file stored somewhere in your DOS PATH or in
  88. ; your current directory.
  89. ;
  90. define _modem HAYES            ; Default is modem type is HAYES.
  91. if not eq "\$(MODEM)" "" -
  92.   define _modem \$(MODEM)
  93. if > \v(version) 311 if not inpath \m(_modem).SCR -
  94.   echo WARNING: Dialing script file \m(_modem).SCR not found!
  95.  
  96. COMMENT - Macro definitions section...
  97.  
  98. ; Macros for communicating with UNIX, VAX/VMS, and similar systems:
  99. def vax set par non, set flo x, set hand no, set dupl ful, set key \270 \127
  100. def vms do vax, set term byte 8  ; Assumes 8-bit no-parity connection.
  101. def unix do vax, set term byte 7 ; Most UNIX systems are still 7-bit.
  102.  
  103. ; Macro for communicating with IBM mainframes in linemode:
  104. def ibm set par mark, set flo no, set hand xon, set dup ha, set key \270 \8
  105.  
  106. ; Macro for communicating with IBM mainframes in fullscreen mode,
  107. ; through 3270 protocol converter like IBM 7171:
  108. def fullscreen set par ev,set flo x,set hand no,set dupl ful,set key \270 \8
  109.  
  110. ; Additional DOS commands available directly from the MS-Kermit> prompt.
  111.  
  112. ; DOS MORE command...
  113. def more if < argc 2 fatal {More what?},-
  114. run more < \%1
  115.  
  116. ; DOS REN(ame) command...
  117. def rename if < argc 2 fatal {Rename what?},-
  118.   if < argc 3 fatal {Rename \%1 to what?},-
  119.   run ren \%1 \%2
  120.  
  121. ; DOS COPY command...
  122. def copy if < argc 2 fatal {Copy what?},-
  123.   if < argc 3 fatal {Copy \%1 to what?},-
  124.   run copy \%1 \%2
  125.  
  126. ; DOS CHCP command to examine or change code page...
  127. def chcp run chcp \%1
  128.  
  129. ; EDIT command...
  130. def edit if = argc 2 assign _editfile \%1,-
  131.   if not def _editfile fatal {Edit what?},-
  132.   run \m(_editor) \m(_editfile)
  133.  
  134. ; CAPTURE command - Easy downloading of a file from the host, with no error
  135. ; checking.  Unlike the LOG SESSION command, CAPTURE always creates a new
  136. ; file.  It overwrites file of same name if it already exists.  Usage: at the
  137. ; MS-Kermit> prompt, type "capture xxx" where xxx is the name of the file you
  138. ; want to create on the PC.  Once you are connected to the host, TYPE the
  139. ; desired file.  Escape back when done.  The captured file will be on your
  140. ; disk (with a TYPE command at the beginning & a prompt at the end).
  141. ;
  142. def capture if = \v(argc) 1 fatal {Capture into what file?},-
  143.   if exist \%1 del \%1,-
  144.   log session \%1,-
  145.   connect,close session,log sess session.log,close sess
  146.  
  147. ; NORMAL, NOISY and CLEAN macros, modify to suit your environment...
  148. def normal set rec pac   94, set ret  5, set block 1, set window 1
  149. def noisy  set rec pac   40, set ret 20, set block 3, set window 8
  150. def clean  set rec pac 1000, set ret  4, set block 2, set window 2
  151.  
  152. ; Define a FATAL error macro.  Print message, go back to prompt.
  153. def fatal echo \%1, stop
  154.  
  155. ; ERRSTP macro, for use in scripts that want to hang up a dialed
  156. ; or network connection if there is any error.
  157. def errstp echo \%1,hangup,stop
  158.  
  159. ; LOOKUP macro for use with DIAL command.
  160. ; Requires MS-DOS Kermit 3.11 or later.
  161. ; Uses \m(_dialfile) for the dialing directory filename, defined above.
  162. ; Edit that file to contain the entries you will actually want to use.
  163. ;
  164. if < version 311 goto nolook
  165. def split assign \%x \%1,-
  166.   assign \%y \%2,-
  167.   assign \%s \%3,-
  168.   assign \%p \%4
  169.  
  170. def lookup if < \v(argc) 2 end 0,-
  171.   if not def _dialfile end 0,-
  172.   if not exist \m(_dialfile) end 0,-
  173.   open read \m(_dialfile),-
  174.   if failure fatal {Can't open dialing directory file \m(_dialfile)},-
  175.   assign \%5 \%x, assi \%6 \%y, assi \%7 \%s, assi \%8 \%p,-
  176.   echo Looking up "\%1",-
  177. :loop,-
  178.   read \%9,-
  179.   if fail goto eof,-
  180.   split \%9,-
  181.   if def \%x if not equal {\%x} {\%1} goto loop,-
  182.   echo From dialing directory: \%x = \%y,-
  183.   assign _dialnum \%y,-
  184.   if def \%s if not eq \%s = set speed \%s,-
  185.   if def \%p if not eq \%p = set parity \%p,-
  186.   goto done,-
  187. :eof,-
  188.   echo "\%1" not found in dialing directory \m(_dialfile),-
  189. :done,-
  190.   assign \%x \%5, assi \%y \%6, assi \%s \%7, assi \%p \%8,-
  191.   close read
  192.  
  193. ; LIST macro to list dialing directory.
  194. ; Assumes pathname of dialing directory is in \m(_dialfile).
  195. define list -
  196.   if not def _dialfile fatal {_DIALFILE not defined},-
  197.   if not exist \m(_dialfile) -
  198.     fatal {Can't find dialing directory file \m(_dialfile)},-
  199.   if < argc 2 run more < \m(_dialfile),-
  200.   if > argc 1 run find "\%1" \m(_dialfile) | more
  201.  
  202. ; DIAL and REDIAL commands...
  203. ;
  204. ; Requires the file \m(_modem).SCR to be on current disk or in DOS PATH,
  205. ; e.g., HAYES.SCR. Uses LOOKUP macro to access your dialing directory, if any.
  206. ; If argument omitted, uses previous phone number, if any.
  207. ; If multiple arguments are given, they are concatenated together
  208. ; with the separating spaces preserved, so you can "dial 800 765 4321".
  209. ;
  210. def dial if < \v(argc) 2 if not def _dialnum fatal {Dial what?},-
  211.   if > \v(argc) 2 assign \%1 \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9,-
  212.   if > \v(argc) 1 assign _dialnum \%1,-
  213.   if not < \v(argc) 2 lookup {\m(_dialnum)},-
  214.   assign \%1 \m(_dialnum),-
  215.   take \m(_modem).scr,-
  216.   if fail end 1, end 0
  217.  
  218. define redial if not def _dialnum fatal {No number to redial}, dial
  219.  
  220. goto common            ; Skip over old-version warning
  221.  
  222. :NOLOOK
  223. version
  224. echo WARNING: This Kermit initialization file is for use with MS-DOS Kermit
  225. echo version 3.11 or later.  The LOOKUP macro will not be defined, and DIAL
  226. echo will not work.  Use an earlier version of MSKERMIT.INI or a later
  227. echo version of MS-DOS Kermit.
  228. define lookup echo The LOOKUP macro is not defined, stop
  229. define dial echo The DIAL macro is not defined, stop
  230.  
  231. :COMMON
  232.  
  233. COMMENT - File transfer settings
  234.  
  235. set file collision rename    ; Don't overwrite existing files
  236. set transfer character-set transparent ; For compatibility with old versions
  237. set receive packet-length 94    ; Regular-size packets
  238. set attributes on        ; Use file-attribute packets
  239. set window 1            ; Don't use sliding windows
  240.  
  241. COMMENT - Script defaults
  242.  
  243. set input timeout proceed    ; Allow IF SUCCESS/FAILURE to work
  244. set input echo on        ; Display port input on screen
  245. set input case ignore        ; Ignore alphabet case for input matching
  246.  
  247. ; The following setups are IBM-PC specific...
  248.  
  249. if not eq "\v(platform)" "IBM-PC" goto fin
  250.  
  251. COMMENT - Terminal emulation settings.  Modify to suit your environment.
  252.  
  253. set terminal display 7        ; In the 7-bit environment (use 8 for VMS)
  254. set terminal vt320        ; Emulate DEC VT320
  255. set terminal roll off        ; Keep rolled-back screens where they are
  256. set terminal wrap on        ; Tell Kermit to do line wrap
  257. set terminal tabs at 1:8    ; Set tabs at every 8 spaces
  258. set terminal cursor underline    ; Underline cursor (rather than block)
  259.  
  260. COMMENT - Personalized initialization file
  261. ;
  262. if > \v(version) 311 if not inpath MSCUSTOM.INI goto fin
  263. take mscustom.ini
  264.  
  265. :FIN
  266. echo Smile!
  267.